package br.org.credfaz.ficha.action;

import java.util.List;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;

import br.org.credfaz.ficha.dao.ClienteDAO;
import br.org.credfaz.ficha.modelo.Cliente;

public class ListaClienteAction {

	private List<Cliente> clientes;
	
	@Action(value = "listaClientes", results = {
			@Result(name = "ok", location = "/lista-clientes.jsp") 
			})
	public String execute() {
		clientes = new ClienteDAO().lista();
		return "ok";
	}

	public List<Cliente> getClientes() {
		return clientes;
	}
	
}
